<template>
  <div class="example">
    <vue3dLoader
    filePath="/models/collada/stormtrooper/stormtrooper.dae"
    :cameraPosition="{ x: 1, y: -5, z: -20 }"
    :height="350"
    :width="800"
    />
</div>
</template>
<script setup lang="ts">
import { ref } from "vue";
import { vue3dLoader } from 'vue-3d-loader'
const rotation = ref();
const show = ref(false)
rotation.value = {
  x: -Math.PI / 2,
  y: 0,
  z: 0,
};
function onLoad() {
  rotate();
  show.value = true

}
function rotate() {
  requestAnimationFrame(rotate);
  rotation.value.z -= 0.01;
}

</script>
<style>
.example {
  width: 100%;
  height: 100%;
}
</style>